package com.javacore.day4;

public class VongTron {

	int r;


	/**
	 * @return the r
	 */
	public int getR() {
		return r;
	}

	/**
	 * @param r the r to set
	 */
	public void setR(int r) {
		this.r = r;
	}

	/**
	 * @return the area of circle 
	 */
	public double getArea() {
		return Math.PI * r * r;
	}
	/**
	 * @return the perimeter of circle 
	 */
	private double getPerimeter() {
		return 2 * Math.PI * r;
	}
	public VongTron(int r){
		this.r =r;
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		VongTron tron = new VongTron(6);
		System.out.println("Chu vi: "+ tron.getPerimeter());
		System.out.println("Diện tích: " + tron.getArea());
	}

}
